package com.killer.user.controller;


import com.killer.common.entity.Result;
import com.killer.user.entity.User;
import com.killer.user.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.killer.db.controller.BaseController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author killer
 * @since 2021-10-31
 */
@RestController
@RequestMapping("/user")
public class UserController extends BaseController<IUserService, User> {

    @RequestMapping("/findByUsername")
    public Result<User> findByUsername(@RequestParam("username") String username) {
        User user = baseService.findByUsername(username);
        return Result.success(user);
    }
}
